<!DOCTYPE html>
<html>
<head>
    <title>帮助中心</title>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0, user-scalable=no"/>
    <script src="js/flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<div>帮助中心</div>
<ul id="help">
    <li v-for="item in list" @click="toDetail(item.id, item.title, item.token)">
        <span v-text="item.title"></span>
        <img src="image/icon_message_right.png"/>
    </li>
</ul>
<script src="js/vue.min.js"></script>
<script src="js/all.js" type="text/javascript" charset="utf-8"></script>
<script src="js/axios.min.js"></script>
<script src="js/message.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    var vm = new Vue({
        el:"#help",
        data:{
            list:[],
            mToken:''
        },
        methods:{
            query:function(){
                axios.get(url+"/getContentTitle",{
                  headers:{"token":GetQueryString("token")}
                  //  headers:{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpdyI6IlR1ZSBBdWcgMTUgMTc6MTQ6MzAgQ1NUIDIwMTcifQ.S6k4iRxnqEKtoWT4DiSYEVchOAFy1VaivQM2nXoaORsuserId:679"}
                }).then(function(data){
                    this.list = data.data.data;
//                    console.log(data);
                }.bind(this))
            },
             getData:function(token){
               this.mToken=token;
                axios.get(url+"/getContentTitle",{
                  headers:{"token":token}
                }).then(function(data){
                    this.list = data.data.data;
//                    console.log(data);
                }.bind(this))

            },

            toDetail:function(id,title){
                window.location.href='helpDetail.html?id='+id+'&title='+title+"&token="+GetQueryString("token")
            }
            <!--toDetail:function(id,title){-->
                <!--window.location.href='helpDetail.html?id='+id+'&title='+title+"&token="+this.mToken-->
            <!--}-->
        },
        mounted:function(){
            this.$nextTick(function(){   // 文档加载后调用
                this.query()
            });
        }
    })




</script>
</body>
</html>
